package com.mhc.haval.security.model;

import lombok.Data;
import org.springframework.security.core.GrantedAuthority;

/**
 * @author Churry
 * @create 2017-08-18 10:59
 **/
@Data
public class RestGrantedAuthority implements GrantedAuthority {

    private String method;
    private String url;

    public RestGrantedAuthority (String url, String method) {
        this.url = url;
        this.method = method;
    }

    @Override
    public String getAuthority() {
        return this.url + ":" + this.method;
    }
}
